import * as Router from '@koa/router'
import AuthController from '../controllers/auth'
import UserController from '../controllers/user'

const router = new Router()
router.post('/auth/login', AuthController.login)
router.post('/auth/reg', AuthController.register)

router.get('/users', UserController.listUsers)
router.get('/users/:id', UserController.showUserById)
router.put('/users/:id', UserController.updateUser)
router.delete('/users/:id', UserController.deleteUser)
router.get('/users/info', UserController.showUserDetail)

export default router
